// config/menu.ts
import type { MenuConfig } from '@/types/menu'

export const menuConfig: MenuConfig[] = [
  {
    id: 'dashboard',
    name: '数据概览',
    icon: 'DataAnalysis',
    path: '/dashboard'
  },
  {
    id: 'data',
    name: '数据管理',
    icon: 'DataLine',  // 使用 DataLine 图标替换原来的 Data
    path: '/data',
    children: [
      {
        id: 'plugin-management',
        name: '插件数据管理',
        path: '/data/plugin-management'
      }
    ]
  },
  {
    id: 'reconciliation',
    name: '智能对账',
    icon: 'Coin',
    path: '/finance/reconciliation',
    children: [
      {
        id: 'workbench',
        name: '智能对账工作台',
        path: '/finance/reconciliation/workbench'
      },
      {
        id: 'results',
        name: '对账结果',
        path: '/finance/reconciliation/results'
      },
      {
        id: 'manual-match',
        name: '手工匹配',
        path: '/finance/reconciliation/manual-match'
      }
    ]
  },
  {
    id: 'finance',
    name: '财务管理',
    icon: 'Money',
    path: '/finance',
    children: [
      {
        id: 'transactions',
        name: '银行流水',
        path: '/finance/transactions'
      },
      // 添加催款管理二级菜单
      {
        id: 'collection',
        name: '催款管理',
        path: '/finance/collection'
      },
      // 添加进项发票菜单项
      {
        id: 'incoming-invoices',
        name: '进项发票',
        path: '/finance/invoices/incoming'
      },
      // 添加销项发票菜单项
      {
        id: 'outgoing-invoices',
        name: '销项发票',
        path: '/finance/invoices/outgoing'
      }
    ]
  },
  {
    id: 'sales',
    name: '销售管理',
    icon: 'TrendCharts',
    path: '/sales',
    children: [
      {
        id: 'dashboard',
        name: '销售仪表板',
        path: '/sales/dashboard'
      },
      {
        id: 'customers',
        name: '客户管理',
        path: '/sales/customers'
      },
      {
        id: 'orders',
        name: '销售订单',
        path: '/sales/orders'
      },
      {
        id: 'analysis',
        name: '销售分析',
        path: '/sales/analysis'
      }
    ]
  },
  {
    id: 'inventory',
    name: '库存管理',
    icon: 'Box',
    path: '/inventory',
    children: [
      {
        id: 'products',
        name: '产品管理',
        path: '/inventory/products'
      },
      {
        id: 'stock',
        name: '库存管理',
        path: '/inventory/stock'
      }
    ]
  },
  {
    id: 'purchase',
    name: '采购管理',
    icon: 'ShoppingCart',
    path: '/purchase',
    children: [
      {
        id: 'suppliers',
        name: '供应商管理',
        path: '/purchase/suppliers'
      },
      {
        id: 'orders',
        name: '采购订单',
        path: '/purchase/orders'
      }
    ]
  },
  {
    id: 'system',
    name: '系统管理',
    icon: 'Setting',
    path: '/system',
    children: [
      {
        id: 'users',
        name: '用户管理',
        path: '/system/users'
      },
      {
        id: 'roles',
        name: '角色管理',
        path: '/system/roles'
      },
      {
        id: 'settings',
        name: '系统设置',
        path: '/system/settings'
      }
    ]
  }
]